#include <iostream>

#define N 2

using namespace std;

int diagonal(int a[N][N]);

int main( )
{
    int a[N][N], i,j,k;

    for(i=0;i<N;i++)
        for(j=0;j<N;j++)
        {
            cin>>a[i][j];
        }

        k=diagonal(a);

    if(k==N) cout<<"this mat is a diagonal mat"<<endl;
    else cout<<"this mat is not a diagonal mat"<<endl;

    cin>>k;
    return 0;
}

int diagonal(int a[N][N])
{
    int i,j,k=1;

    for(i=1;i<N;i++)

        for(j=0;j<i;j++)

            if(a[i][j]==a[j][i])  k++;
    
    return k;
}